package command

import (
    "ginweb/internal/domain/order"
)

type OrderService struct {
    repo order.OrderRepository
}

func NewOrderService(repo order.OrderRepository) *OrderService {
    return &OrderService{repo: repo}
}

func (s *OrderService) CreateOrder(order *order.Order) error {
    return s.repo.CreateOrder(order)
}

func (s *OrderService) UpdateOrder(order *order.Order) error {
    return s.repo.UpdateOrder(order)
}

func (s *OrderService) DeleteOrder(id string) error {
    return s.repo.DeleteOrder(id)
}